<template>
  <ul class="todo-main">
    <Item :delettodo="delettodo" v-for="item in todos" :key="item.id" :item="item" :checkstodo="checkstodo" />
  </ul>
</template>

<script>
import Item from './Item/Item.vue'
export default {
  components: { Item },
  name: 'TodoList',
  // App组件传来数据
  props: ['todos', 'delettodo', 'checkstodo']
}
</script>










<style scoped>
/*List*/
.todo-main {
  margin-left: 0px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0px;
}

.todo-empty {
  height: 40px;
  line-height: 40px;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding-left: 5px;
  margin-top: 10px;
}
</style>